package ThreadDemo;

public class ThreadDemo01 {
    static class MyThread extends Thread{
        @Override
        public void run() {
            System.out.println("我是一个线程");
            while(true){
                try {
                    sleep(1000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        }
    }

    public static void main(String[] args) {
        Thread t=new MyThread();
        t.start();
        while(true){

        }
    }
}
